#include<iostream>
#include<vector>
using namespace std;

int f1(){
    int *a = new int(3);
    return *a;
}

int* f2(){
    int a[3] = {1,2,3};
    return a;
}

vector<int> f3(){
    vector<int> v(3);
    v.push_back(4);
    return v;
}

void f4(int* &ret){
    int a[3] = {1,2,3};
    ret = a;
    return;
}

int main(){
    //printf("%d",f1());
    printf("%d",f2()[1]);
    /*
    vector<int> v1 = f3();
    int i = v1.back();
    printf("%d",i);
    */
    /*
    int b[2] = {4,5};
    int *ret = b;
    f4(ret);
    printf("%d",ret[0]);
    */
    return 0;
}
